<!DOCTYPE html>
<html>
<head>
  <div  th:replace="common/header.html"></div>


</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div th:replace="common/chart.html"></div>

<div class="wrapper">

  <div th:replace="common/navbar.html"></div>

  <div th:replace="common/aside.html"></div>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1></h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item active"></li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="row">

  <div class="col-md-12">
    <div class="card card-primary">
      <div class="card-header">
        <h3 class="card-title" th:text="${dbTable.remark}">详细信息</h3>
        <div class=" float-sm-right">
          <a th:href="@{'/dbTable/list'}">返回</a>
        </div>
      </div>
      <!-- /.card-header -->
      <!-- form start -->
      <form role="form">
        <div class="card-body">
          <div class="form-group">
            <label for="exampleInputEmail1">数据表统计sql语句</label>
              <div  th:text="${sqlCount}"></div>
          </div>
        </div>
        <!-- /.card-body -->
      </form>
      <!-- /.card-body -->


        <label style="margin-left: .9rem">最近15天数据量变化</label>
        <div id="cpuStateJson"></div>



    </div>
    <!-- /.card -->


  </div>

        </div>
      </div>
    </section>
  </div>


  <div th:replace="common/footer.html"></div>

</div>
<!-- ./wrapper -->

<script th:src="@{'/static/js/dbtable.js'}"></script>


<script th:inline="javascript">
    var dbTableCountsJson =[[${dbTableCounts}]];
    $(function() {
      var chart = new G2.Chart({
        container: 'cpuStateJson',
        forceFit: true,
        height: 500,
        padding: [30, 40, 70, 40]
      });
      chart.axis('dateStr', {
        label: {
          textStyle: {
            fill: '#aaaaaa'
          }
        }
      });
      chart.axis('tableCount', {
        label: {
          textStyle: {
            fill: '#aaaaaa'
          }
        }
      });
      chart.tooltip({
        crosshairs: false
      });
      chart.legend({
        position: 'top-center'
      });
      chart.source(dbTableCountsJson, {
        tableCount: {
          alias: '数据量'
        }
      });
      chart.scale('dateStr',{tickCount: 12,alias: '时间'});
      chart.line().position('dateStr*tableCount').color('#1890ff');
      chart.render();

    })

</script>


</body>
</html>
